import VueRouter from 'vue-router'
//  定义 (路由) 组件
import ALogin from '../components/ALogin.vue'
import PIndex from '../pages/PIndex.vue'

// 定义路由
const routes = [
    {
        path: '/login',
        component: ALogin,
        name: 'login'
    },
    {
        path: '/',
        component: PIndex,
        name: 'index'
    }
]

// 创建 router 实例，然后传 `routes` 配置
const router = new VueRouter({
    routes
})

export default router
